package com.acme;

import com.acme.domain.account.*;
import com.acme.domain.bank.*;

class BankApplication {
	public static void main(String[] args){
		/* part 1 */
		Account acc1 = new SavingsAccount(30);
		Account acc2 = new CheckingAccount(40.32456,10);
		Client client1 = new Client(acc1, Gender.MALE, "Petrov");
		Client client2 = new Client(acc2, Gender.MALE, "Petrov");
		System.out.println("Client:");
		if ( client1 == client2 ){
			System.out.println(" 	== condition is true");
		} else {
			System.out.println(" 	== condition is false");
		}
		if (client1.equals(client2)){
			System.out.println(" 	'equal' condition is true");
		} else {
			System.out.println(" 	'equal' condition is false");
		}
		
		System.out.println(client1.hashCode()+ " , " + client2.hashCode());
		
		acc1.setId(25);
		acc2.setId(25);
				
		if ( acc1 == acc2 ){
			System.out.println(" 	== condition is true");
		} else {
			System.out.println(" 	== condition is false");
		}
		
		if (acc1.equals(acc2)){
			System.out.println(" 	'equal' condition is true");
		} else {
			System.out.println(" 	'equal' condition is false");
		}
		
		System.out.println(acc1.hashCode()+ " , " + acc2.hashCode());
		
		/* part 2 */
		System.out.println(client1);
		System.out.println(acc1);
		System.out.println(acc2);
		/* part 3 */
		System.out.println(acc2.decimalValue());
	}
}